Networking
Table of Contents

Doing things across networks


  • func get_socket_event( atom event )   
  • func is_connected( atom socket )   
  • proc set_flags( atom socket, atom flags )   
  • proc set_socket_notify( atom socket, object notify )   
  • proc socket_event_handler( atom socket, atom evt_handler, atom id )   
  • func socket_from_event( atom event )   
  • proc socket_read( atom socket )   
  • proc socket_write( atom socket, sequence bytes )     
     
    Subtopics:
  • wxFTP
  • wxHTTP
  • wxIPV4address
  • wxSocketClient
  • wxSocketServer
  • wxURL

    Networking
    Table of Contents

    [func]
    get_socket_event
    ( atom event )

    Category: Networking

    See Also: is_connected, set_flags, set_socket_notify, socket_event_handler, socket_from_event, socket_read, socket_write


    Networking
    Table of Contents

    [func]
    is_connected
    ( atom socket )

    Category: Networking

    Returns a 0 if the socket is not connected, 1 if it is.

    See Also: get_socket_event, set_flags, set_socket_notify, socket_event_handler, socket_from_event, socket_read, socket_write


    Networking
    Table of Contents

    [proc]
    set_flags
    ( atom socket, atom flags )

    Category: Networking

    Sets a sequence of flags to a specified socket. You must assign a socket flags after every procedure/function loop or it will not look for them and you could lose soemthing. Events that can be chosen are

    Alternatively, you can do set_flags ( Socket, {0} ) which will make the socket stop waiting for events. However, the connection will still remain.

    See Also: get_socket_event, is_connected, set_socket_notify, socket_event_handler, socket_from_event, socket_read, socket_write


    Networking
    Table of Contents

    [proc]
    set_socket_notify
    ( atom socket, object notify )

    Category: Networking

    Works for both wxSocketServer and wxSocketClient. Specifies which socket events are to be sent to the event handler. The flags parameter may be combination of flags ORed together. The following flags can be used:

    See Also: get_socket_event, is_connected, set_flags, socket_event_handler, socket_from_event, socket_read, socket_write


    Networking
    Table of Contents

    [proc]
    socket_event_handler
    ( atom socket, atom evt_handler, atom id )

    Category: Networking

    When calling set_event_handler() for a wxEVT_SOCKET event, for the 'this' parameter, you must pass a sequence consisting of the object to handle the events and the socket: code socket_event_handler( socket, form, socket_id ) set_event_handler( {form, socket}, -1, wxEVT_SOCKET, routine_id("socket_event")) endcode

    See Also: get_socket_event, is_connected, set_flags, set_socket_notify, socket_from_event, socket_read, socket_write


    Networking
    Table of Contents

    [func]
    socket_from_event
    ( atom event )

    Category: Networking

    Returns the pointer to the socket that sent the wxSocketEvent.

    See Also: get_socket_event, is_connected, set_flags, set_socket_notify, socket_event_handler, socket_read, socket_write


    Networking
    Table of Contents

    [proc]
    socket_read
    ( atom socket )

    Category: Networking

    Works for wxSocketServer, wxSocketClient, wxHTTP and wxFTP.

    See Also: get_socket_event, is_connected, set_flags, set_socket_notify, socket_event_handler, socket_from_event, socket_write


    Networking
    Table of Contents

    [proc]
    socket_write
    ( atom socket, sequence bytes )

    Category: Networking

    Works for both wxSocketServer and wxSocketClient.

    See Also: get_socket_event, is_connected, set_flags, set_socket_notify, socket_event_handler, socket_from_event, socket_read